1. Technical Field
The present innovations relate generally to hierarchical file systems in computers, and more particularly to migration of open files on a busy file system.
2. Description of Related Art
UNIX-compatible operating systems provide a hierarchical file system structure, starting at a root directory. Additional file system hierarchies may be added to the initial file system hierarchy by means of a “mount” operation. A mount operation causes the system's hierarchical file system structure to include all of the files and directories presented by the newly added file system.
Removal of a mounted file system hierarchy requires that either all of the open files on the file system be closed, or a “force unmount” operation may be performed. Neither of these methods is optimal.
Requiring all the open files on the file system to be closed means that processes which are then running that use the open files must be interrupted to close the relevant files.
Operating systems assign a unique number to an opened file for its internal management. This number, or handle, unambiguously characterizes the opened file. Typically, if an open file is moved on a file system using a force unmount, the process will receive an error indicating that the file handle is stale, which results in aborting the program due to the error.
Another solution to unmounting open files exists in the checkpoint/restart facility. In that facility a process and all its state information is captured in a disk file for later restart. This facility could be used to “free up” a mounted file system. However, the amount of disk space used by a checkpointed process is substantial. This also assumes that the checkpoint operation was of the form where the process is forced to exit since otherwise the target file system still has a busy file. This solution does not require that the entire process state be saved, only that the contents of the open files be saved. Though the process does remain running, it is unavailable between the time it is checkpointed and the time it is restarted.